import {request} from '@umijs/max';
import {AuthoritySelectListData} from "@/pages/organization/user-list/data";
import {SkuListItem} from "@/pages/power/sku/sku-edit/data";

export async function skuAdd(params: any) {
    return request('/api/sku/add', {
        method: 'POST',
        data: params,
    });
}

/** 角色列表 POST /api/sku/detail */
export async function skuDetail(
    params: {
        skuId?: string;
    },
    options?: { [key: string]: any },
) {
    return request<{
        data: SkuListItem;
    }>('/api/sku/detail', {
        method: 'GET',
        params: {
            ...params,
        },
        ...(options || {}),
    });
}
